<template>
  <div>
    <van-form>
      <van-cell-group inset>
        <h3>服务信息</h3>
        <van-field
          v-model="publicForm.businessOpportunityContentVO.opporContName"
          label="服务名称"
          placeholder="请输入服务名称"
          :rules="[
            { required: true, message: '请输入服务名称', trigger: 'onBlur' },
          ]"
        />
        <bob-select
          v-model:bindModel="
            publicForm.businessOpportunityContentVO.opporContType
          "
          label="服务类型"
          placeholder="请选择"
          :picker-list="businessList"
          :rules="[
            { required: true, message: '请选择服务类型', trigger: 'onChange' },
          ]"
        ></bob-select>
        <bob-select
          v-model:bindModel="
            publicForm.businessOpportunityContentVO.opporContLoct
          "
          label="服务区域"
          placeholder="请选择"
          :picker-list="businessList"
          :rules="[
            { required: true, message: '请选择服务区域', trigger: 'onChange' },
          ]"
        ></bob-select>
        <van-field
          v-model="publicForm.businessOpportunityContentVO.contModel"
          label="服务费用标准"
          placeholder="请输入商品价格"
          :rules="[
            { required: true, message: '请输入商品价格', trigger: 'onBlur' },
          ]"
        />
        <bob-select
          v-model:bindModel="
            publicForm.businessOpportunityContentVO.currencyCode
          "
          label="币种"
          placeholder="请选择"
          :picker-list="businessList"
          :rules="[
            { required: true, message: '请选择币种', trigger: 'onChange' },
          ]"
        ></bob-select>
      </van-cell-group>
    </van-form>
    <van-form style="margin-top: 12px">
      <van-cell-group inset>
        <h3>附件上传</h3>
        <van-field name="uploader">
          <template #input>
            <van-uploader />
          </template>
        </van-field>
      </van-cell-group>
    </van-form>
  </div>
</template>

<script setup lang="ts">
import { useBusinessPub } from "@/stores/businessPub";
import { storeToRefs } from "pinia";
const store = useBusinessPub();
const { publicForm } = storeToRefs(store);

const businessList = ref<any[]>([
  {
    text: "京东",
    value: "JD",
  },
]);
</script>

<style lang="scss" scoped>
h3 {
  padding: 16px 16px 8px;
  color: #000;
  font-weight: bold;
  font-size: 16px;
}

:deep(.van-cell-group--inset) {
  margin: 0;
}
</style>

